package com.huirui.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huirui.server.pojo.dto.UserSettingDto;
import com.huirui.server.pojo.dto.VerificationCodeLoginDTO;
import com.huirui.server.pojo.entity.User;
import com.huirui.server.pojo.result.PageResult;
import com.huirui.server.pojo.vo.UserBriefInfoVo;
import com.huirui.server.pojo.vo.UserSettingVo;
import com.huirui.server.pojo.vo.UserVo;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author yujun
 * @description 针对表【t_user(用户表)】的数据库操作Service
 * @createDate 2025-09-14 10:48:11
 */
public interface UserService extends IService<User> {

    String getVerificationCode(String phone);

    String loginByVerificationCode(VerificationCodeLoginDTO loginDTO);

    UserBriefInfoVo getUserBriefInfo();

    String loginByWeChatOpenid(String code);

    UserSettingVo getUserSettingInfo();

    void updateUserInformation(UserSettingDto userSettingDto);

    PageResult<UserVo> listByCondition(
            String userName,
            Long userId,
            String phoneNumber,
            LocalDate registrationStartDate,
            LocalDate registrationEndDate,
            BigDecimal minimumConsumptionAmount,
            BigDecimal maximumConsumptionAmount,
            Long page,
            Long pageSize
    );

    String loginQuickly(String code);
}
